﻿using System;
using System.Collections;
using System.Data;


namespace Entity
{
    public class News
    {
        public string Id { get; set; }
        public string Name{ get; set; }
        public string Tag{ get; set; }
        public string Image{ get; set; }
        public string File{ get; set; }
        public string Content{ get; set; }
        public string Detail{ get; set; }
        public string Date{ get; set; }
        public string Title{ get; set; }
        public string Description{ get; set; }
        public string Keyword{ get; set; }
        public string Priority{ get; set; }
        public string Index{ get; set; }
        public string Check1{ get; set; }
        public string Check2{ get; set; }
        public string Check3{ get; set; }
        public string Check4{ get; set; }
        public string Check5{ get; set; }
        public string Check6{ get; set; }
        public string Order{ get; set; }
        public string Active{ get; set; }
        public string GroupNewsId{ get; set; }
        public string Lang{ get; set; }
        public string Views{ get; set; }

        public News NewsIDataReader(IDataReader dr)
        {
            return new News
                       {
                            Id = Convert.ToString(dr["Id"]),
                            Name = Convert.ToString(dr["Name"]),
                            Tag = Convert.ToString(dr["Tag"]),
                            Image = Convert.ToString(dr["Image"]),
                            File = Convert.ToString(dr["File"]),
                            Content = Convert.ToString(dr["Content"]),
                            Description = Convert.ToString(dr["Description"]),
                            Date = Convert.ToString(dr["Date"]),
                            Title = Convert.ToString(dr["Title"]),
                            Index = Convert.ToString(dr["Index"]),
                            Keyword = Convert.ToString(dr["Keyword"]),
                            GroupNewsId = Convert.ToString(dr["GroupNewsId"]),
                            Order = Convert.ToString(dr["Order"]),
                            Lang = Convert.ToString(dr["Lang"]),
                            Views = Convert.ToString(dr["Views"]),
                            Active = Convert.ToString(dr["Active"]),
                            Priority = Convert.ToString(dr["Priority"]),
                            Check1 = Convert.ToString(dr["Check1"]),
                            Check2 = Convert.ToString(dr["Check2"]),
                            Check3 = Convert.ToString(dr["Check3"]),
                            Check4 = Convert.ToString(dr["Check4"]),
                            Check5 = Convert.ToString(dr["Check5"]),
                            Check6 = Convert.ToString(dr["Check6"]),
                       };
        }

        
    }
}
